\hypertarget{a00074}{}\section{E\+:/knet-\/git/knet/knet/logger.c 文件参考}
\label{a00074}\index{E\+:/knet-\/git/knet/knet/logger.\+c@{E\+:/knet-\/git/knet/knet/logger.\+c}}
{\ttfamily \#include $<$stdarg.\+h$>$}\\*
{\ttfamily \#include \char`\"{}misc.\+h\char`\"{}}\\*
\subsection*{结构体}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{a00028}{\+\_\+logger\+\_\+t}
\end{DoxyCompactItemize}
\subsection*{函数}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00056_a1926fbbc891c0da81a8e683ac83deb05_a1926fbbc891c0da81a8e683ac83deb05}{klogger\+\_\+t} $\ast$ \hyperlink{a00074_aedcf4b2fca57e3e8e3886c1acea38afd_aedcf4b2fca57e3e8e3886c1acea38afd}{logger\+\_\+create} (const char $\ast$path, \hyperlink{a00056_a8bb61ec2ff976625d0707a81c1ccc149_a8bb61ec2ff976625d0707a81c1ccc149}{knet\+\_\+logger\+\_\+level\+\_\+e} level, \hyperlink{a00056_a3ad8e017e53143bca2ada78d2bfa30e1_a3ad8e017e53143bca2ada78d2bfa30e1}{knet\+\_\+logger\+\_\+mode\+\_\+e} mode)
\begin{DoxyCompactList}\small\item\em 建立日志 \end{DoxyCompactList}\item 
void \hyperlink{a00074_a4a445d874f7523df4fa17b909c47035c_a4a445d874f7523df4fa17b909c47035c}{logger\+\_\+destroy} (\hyperlink{a00056_a1926fbbc891c0da81a8e683ac83deb05_a1926fbbc891c0da81a8e683ac83deb05}{klogger\+\_\+t} $\ast$logger)
\begin{DoxyCompactList}\small\item\em 销毁日志 \end{DoxyCompactList}\item 
int \hyperlink{a00074_a725a2f5b84d2ee158e022d6972f3f327_a725a2f5b84d2ee158e022d6972f3f327}{logger\+\_\+write} (\hyperlink{a00056_a1926fbbc891c0da81a8e683ac83deb05_a1926fbbc891c0da81a8e683ac83deb05}{klogger\+\_\+t} $\ast$logger, \hyperlink{a00056_a8bb61ec2ff976625d0707a81c1ccc149_a8bb61ec2ff976625d0707a81c1ccc149}{knet\+\_\+logger\+\_\+level\+\_\+e} level, const char $\ast$format,...)
\begin{DoxyCompactList}\small\item\em 写日志 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{变量}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00056_a1926fbbc891c0da81a8e683ac83deb05_a1926fbbc891c0da81a8e683ac83deb05}{klogger\+\_\+t} $\ast$ \hyperlink{a00074_a7c44bed9a57ca8f53baa72772e9a42a1_a7c44bed9a57ca8f53baa72772e9a42a1}{global\+\_\+logger} = 0
\end{DoxyCompactItemize}


\subsection{函数说明}
\hypertarget{a00074_aedcf4b2fca57e3e8e3886c1acea38afd_aedcf4b2fca57e3e8e3886c1acea38afd}{}\index{logger.\+c@{logger.\+c}!logger\+\_\+create@{logger\+\_\+create}}
\index{logger\+\_\+create@{logger\+\_\+create}!logger.\+c@{logger.\+c}}
\subsubsection[{logger\+\_\+create}]{\setlength{\rightskip}{0pt plus 5cm}{\bf klogger\+\_\+t}$\ast$ logger\+\_\+create (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{path, }
\item[{{\bf knet\+\_\+logger\+\_\+level\+\_\+e}}]{level, }
\item[{{\bf knet\+\_\+logger\+\_\+mode\+\_\+e}}]{mode}
\end{DoxyParamCaption}
)}\label{a00074_aedcf4b2fca57e3e8e3886c1acea38afd_aedcf4b2fca57e3e8e3886c1acea38afd}


建立日志 


\begin{DoxyParams}{参数}
{\em path} & 日志文件路径, 如果为0将使用当前目录 \\
\hline
{\em level} & 日志等级 \\
\hline
{\em mode} & 日志模式 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
klogger\+\_\+t实例 
\end{DoxyReturn}
\hypertarget{a00074_a4a445d874f7523df4fa17b909c47035c_a4a445d874f7523df4fa17b909c47035c}{}\index{logger.\+c@{logger.\+c}!logger\+\_\+destroy@{logger\+\_\+destroy}}
\index{logger\+\_\+destroy@{logger\+\_\+destroy}!logger.\+c@{logger.\+c}}
\subsubsection[{logger\+\_\+destroy}]{\setlength{\rightskip}{0pt plus 5cm}void logger\+\_\+destroy (
\begin{DoxyParamCaption}
\item[{{\bf klogger\+\_\+t} $\ast$}]{logger}
\end{DoxyParamCaption}
)}\label{a00074_a4a445d874f7523df4fa17b909c47035c_a4a445d874f7523df4fa17b909c47035c}


销毁日志 


\begin{DoxyParams}{参数}
{\em logger} & klogger\+\_\+t实例 \\
\hline
\end{DoxyParams}
\hypertarget{a00074_a725a2f5b84d2ee158e022d6972f3f327_a725a2f5b84d2ee158e022d6972f3f327}{}\index{logger.\+c@{logger.\+c}!logger\+\_\+write@{logger\+\_\+write}}
\index{logger\+\_\+write@{logger\+\_\+write}!logger.\+c@{logger.\+c}}
\subsubsection[{logger\+\_\+write}]{\setlength{\rightskip}{0pt plus 5cm}int logger\+\_\+write (
\begin{DoxyParamCaption}
\item[{{\bf klogger\+\_\+t} $\ast$}]{logger, }
\item[{{\bf knet\+\_\+logger\+\_\+level\+\_\+e}}]{level, }
\item[{const char $\ast$}]{format, }
\item[{}]{...}
\end{DoxyParamCaption}
)}\label{a00074_a725a2f5b84d2ee158e022d6972f3f327_a725a2f5b84d2ee158e022d6972f3f327}


写日志 


\begin{DoxyParams}{参数}
{\em logger} & klogger\+\_\+t实例 \\
\hline
{\em level} & 日志等级 \\
\hline
{\em format} & 日志格式 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em error\+\_\+ok} & 成功 \\
\hline
{\em 其他} & 失败 \\
\hline
\end{DoxyRetVals}


\subsection{变量说明}
\hypertarget{a00074_a7c44bed9a57ca8f53baa72772e9a42a1_a7c44bed9a57ca8f53baa72772e9a42a1}{}\index{logger.\+c@{logger.\+c}!global\+\_\+logger@{global\+\_\+logger}}
\index{global\+\_\+logger@{global\+\_\+logger}!logger.\+c@{logger.\+c}}
\subsubsection[{global\+\_\+logger}]{\setlength{\rightskip}{0pt plus 5cm}{\bf klogger\+\_\+t}$\ast$ global\+\_\+logger = 0}\label{a00074_a7c44bed9a57ca8f53baa72772e9a42a1_a7c44bed9a57ca8f53baa72772e9a42a1}
